<h1><%= @forum.title %> </h1>

<h2>Topics</h2>

<table style="width:768px;">
    <tr>
      <th>Topic</th>
      <th>User</th>
      <th>Last reply</th>
    </tr>
<% @topics.each do |t| %>
    <tr>
      <td>
        <%= link_to t.title, :action => :topic, :id => t.id %>
      </td>
      <td>
        <%= t.user.login %>
      </td>
      <td>
        <%= t.last_reply.created_at.to_s if t.last_reply %>
      </td>
    </tr>
<% end %>
</table>

<%= form_for @new_topic, :url => {:action => :post, :mode => "topic"} do |f| %>
    <%= f.hidden_field :forum_id %>
    <%= f.hidden_field :user_id %>
    <%= f.text_field :title %>
    <%= f.submit  %>
<% end %>